package com.stellar.web.core.enums;


import lombok.Getter;

/**
 * 删除状态枚举
 *
 * @Author Jqcc
 * @Version 1.0
 * @Data 2024/2/14
 */

@Getter
public enum IsDeletedFlagEnum {

    DELETED(1, "已删除"),

    UN_DELETED(0, "未删除");

    private Integer val;

    private String desc;

    IsDeletedFlagEnum(Integer code, String desc) {
        this.val = code;
        this.desc = desc;
    }

    public static IsDeletedFlagEnum getByCode(int val) {
        for (IsDeletedFlagEnum isDeletedFlagEnum : IsDeletedFlagEnum.values()) {
            if (isDeletedFlagEnum.val.equals(val)) {
                return isDeletedFlagEnum;
            }
        }
        return null;
    }
}
